package com.clinic.entity.gui;

import java.util.Date;

import com.clinic.util.CommonUtil;

public class GuiDrugStock {
	
	private long drugStockId;
	private GuiDrug drug;
	private Date expireDate;
	private int orderAmount;
	private int stockAmount;
	private int daysLeft;

	public boolean isAvailable() {
		return drugStockId > 0;
	}

	public long getDrugStockId() {
		return drugStockId;
	}

	public void setDrugStockId(long drugStockId) {
		this.drugStockId = drugStockId;
	}

	public GuiDrug getDrug() {
		return drug;
	}

	public void setDrug(GuiDrug drug) {
		this.drug = drug;
	}

	public String getExpireDateString() {
		return CommonUtil.getDateStringFormatByDate(expireDate);
	}
	
	public void setExpireDateString(String expireDateString) {
		this.expireDate = CommonUtil.getDateByStringFormat(expireDateString);
	}
	
	public Date getExpireDate() {
		return expireDate;
	}

	public void setExpireDate(Date expireDate) {
		this.expireDate = expireDate;
	}
	
	public int getOrderAmount() {
		return orderAmount;
	}

	public void setOrderAmount(int orderAmount) {
		this.orderAmount = orderAmount;
	}

	public int getStockAmount() {
		return stockAmount;
	}

	public void setStockAmount(int stockAmount) {
		this.stockAmount = stockAmount;
	}

	public int getDaysLeft() {
		return daysLeft;
	}

	public void setDaysLeft(int daysLeft) {
		this.daysLeft = daysLeft;
	}

}
